local skel = fk.CreateSkill {
  name = "emo__fuhe",
  tags = {Skill.Compulsory},
}

skel:addEffect(fk.AfterCardsMove, {
  anim_type = "drawcard",
  times = function (self, player)
    return 10 - player:usedEffectTimes(self.name, Player.HistoryTurn)
  end,
  can_trigger = function(self, event, target, player, data)
    if player:hasSkill(skel.name) and player:usedEffectTimes(self.name, Player.HistoryTurn) < 10 then
      if table.find(player.room:getOtherPlayers(player, false), function(p) return p:getHandcardNum() >= player:getHandcardNum() end) then
        for _, move in ipairs(data) do
          if move.to ~= player and move.toArea == Card.PlayerHand then
            return true
          end
        end
      end
    end
  end,
  on_use = function(self, event, target, player, data)
    player:drawCards(1, skel.name)
  end,
})

skel:addEffect(fk.CardUseFinished, {
  anim_type = "negative",
  frequency = Skill.Compulsory,
  can_trigger = function(self, event, target, player, data)
    if player:hasSkill(skel.name) and target == player and player.phase == Player.Play then
      return data.card.type ~= Card.TypeEquip
    end
  end,
  on_use = function(self, event, target, player, data)
    player:endPlayPhase()
  end,
})

Fk:loadTranslationTable{
  ["emo__fuhe"] = "附和",
  [":emo__fuhe"] = "锁定技，①你于出牌阶段使用非装备牌后，结束此阶段。②每回合限十次，每当其他角色获得牌时，若你手牌数不为唯一最大，你摸一张牌。",
}


return skel
